<?php
$currentPage = max(1, $_GET['page'] ?? 1);
$pageSize = 2;
$list = [
    [
        'id' => 3,
        'title' => '提升网站加载速度的10个实用技巧',
        'category' => 'web-dev',
        'category_name' => '网页开发',
        'author' => [
            'name' => '王强',
            'avatar' => 'https://picsum.photos/seed/author3/100/100'
        ],
        'date' => '2023-06-10',
        'read_time' => '6 分钟',
        'image' => 'https://picsum.photos/seed/blog3/400/300',
        'image_alt' => '网站性能分析图表',
        'comments' => 12
    ],
    [
        'id' => 4,
        'title' => '现代UI设计中的微交互原则',
        'category' => 'ux-design',
        'category_name' => 'UX设计',
        'author' => [
            'name' => '刘芳',
            'avatar' => 'https://picsum.photos/seed/author4/100/100'
        ],
        'date' => '2023-06-05',
        'read_time' => '7 分钟',
        'image' => 'https://picsum.photos/seed/blog4/400/300',
        'image_alt' => 'UI设计微交互演示',
        'comments' => 9
    ],
    [
        'id' => 5,
        'title' => '人工智能在软件开发中的应用现状',
        'category' => 'tech-news',
        'category_name' => '技术资讯',
        'author' => [
            'name' => '赵伟',
            'avatar' => 'https://picsum.photos/seed/author5/100/100'
        ],
        'date' => '2023-05-22',
        'read_time' => '9 分钟',
        'image' => 'https://picsum.photos/seed/blog5/400/300',
        'image_alt' => '人工智能与软件开发概念图',
        'comments' => 15
    ],
    [
        'id' => 6,
        'title' => 'TypeScript高级类型技巧与实践',
        'category' => 'web-dev',
        'category_name' => '网页开发',
        'author' => [
            'name' => '张明',
            'avatar' => 'https://picsum.photos/seed/author1/100/100'
        ],
        'date' => '2023-05-18',
        'read_time' => '11 分钟',
        'image' => 'https://picsum.photos/seed/blog6/400/300',
        'image_alt' => 'TypeScript代码示例',
        'comments' => 21
    ]
];
return [
        'id' => 'blog',
        'template' => '/templates/layout.php',
        'title' => '动态 - 我的网站',
        'base_class' => 'container mx-auto px-4 sm:px-6 lg:px-8 py-16 grid grid-cols-1 lg:grid-cols-12 gap-10',
        'custom_utilities' => '.text-balance {
                text-wrap: balance;
            }
            .blog-card-hover {
                @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
            }
            .tag-pill {
                @apply px-3 py-1 rounded-full text-sm font-medium transition-colors duration-200;
            }',
        'dependencies' => [['id' => 'container-left', 'name' => 'container'], ['id' => 'container-right', 'name' => 'container']],
        'components' => [
            // 服务页面的hero配置...
            'hero' => [
                'section_pretitle' => '技术博客',
                'section_title' => '技术博客',
                'section_subtitle' => '从网站开发到数字营销，提供一站式解决方案，定制化服务满足独特需求',
                'alignment' => 'left',
                'buttons' => [],
                'background' => [
                    'type' => 'image',
                    'value' => 'https://picsum.photos/seed/bloghero/1920/600',
                    'overlay' => 40
                ],
                'text_color' => 'white',
                'height' => 'sm',
                'decorations' => [
                    'enabled' => false
                ],
                'image' => [
                    'src' => 'https://picsum.photos/600/400',
                    'position' => 'right',
                    'width' => '3/4'
                ],
                'show_wave' => false
            ],
            'container-left' => [
                'class' => 'lg:col-span-8',
                'dependencies' => ['blog-categories', 'blog-featured', 'blog-latest', ['id' => 'pagination-latest', 'name' => 'pagination']],
            ],
            'container-right' => [
                'class' => 'lg:col-span-4',
                'dependencies' => ['blog-about', 'blog-tags', 'subscribe', 'blog-popular'],
            ],
            'blog-featured' => [
                'items' => [
                    [
                        'id' => 1,
                        'title' => '2023年前端开发趋势与最佳实践',
                        'excerpt' => '探索2023年影响前端开发的关键技术趋势，包括框架选择、性能优化和用户体验设计的最佳实践...',
                        'category' => 'web-dev',
                        'category_name' => '网页开发',
                        'author' => [
                            'name' => '张明',
                            'avatar' => 'https://picsum.photos/seed/author1/100/100'
                        ],
                        'date' => '2023-06-15',
                        'read_time' => '8 分钟',
                        'image' => 'https://picsum.photos/seed/blog1/800/500',
                        'image_alt' => '前端开发代码编辑器界面',
                        'comments' => 24
                    ],
                    [
                        'id' => 2,
                        'title' => 'React Native vs Flutter：跨平台开发对比',
                        'excerpt' => '深入对比当今最流行的两大跨平台框架，分析它们的性能表现、开发体验和适用场景...',
                        'category' => 'mobile-dev',
                        'category_name' => '移动开发',
                        'author' => [
                            'name' => '李华',
                            'avatar' => 'https://picsum.photos/seed/author2/100/100'
                        ],
                        'date' => '2023-05-28',
                        'read_time' => '10 分钟',
                        'image' => 'https://picsum.photos/seed/blog2/800/500',
                        'image_alt' => '移动应用开发界面展示',
                        'comments' => 18
                    ]
                ]
            ],
            'blog-latest' => [
                'items' => array_slice($list, $currentPage - 1, $pageSize),
            ],
            'pagination-latest' => [
                'total_items' => 3,
                'items_per_page' => $pageSize, // 每页显示9个
                'max_visible_pages' => 5,
                'url_pattern' => '/blog?page={page}',
                'show_first_last' => true,
                'show_prev_next' => true
            ],
        ]
];